<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
/* String signature = request.getParameter("signature");
String timestamp = request.getParameter("timestamp");
String nonce = request.getParameter("nonce");
String echostr = request.getParameter("echostr"); */
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Ivory_Valley</title>
<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js" type="text/javascript"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>
</head>
<body>

	用户授权
	
</body>
 <script type="text/javascript">

 $(document).ready(function(){
	 var appid="wx7491574828fade87";
	 var redirect_uri = encodeURIComponent("http://xyg.bigdatas.top/ivory-valley/index.jsp");
		   $.get("https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7491574828fade87&redirect_uri="+redirect_uri+"&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect",
				
				function(data,status){
				alert(data);
				},
				"jsonp"
 		);   
 		//https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7491574828fade87&redirect_uri="+redirect_uri+"&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect
 		 
	});
	function auth(){
		alert(data);
	}
 
	</script>
</html>